//
//  Data.m
//  22-QMusicMVHomework
//
//  Created by dllo on 16/8/13.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "Data.h"
#import "Contents.h"
#import "MvShowPlay.h"

@implementation Data
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"contents"]) {
        _contents = [Contents modelWithDic:value];
    } else if ([key isEqualToString:@"mv_show_play"]) {
        NSMutableArray<MvShowPlay *> *mvArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            MvShowPlay *mvShow = [MvShowPlay modelWithDic:dic];
            [mvArray addObject:mvShow];
        }
        _mv_show_play = mvArray;
    }

}
@end
